package com.ruoyi.etravel.pojo.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 评论相关功能对象 etravel_comment
 *
 * @author ruoyi
 * @date 2022-11-11
 */
@TableName(value = "etravel_comment")
public class Comment extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 用户id */
    @Excel(name = "用户id")
    /**
     * IdType.AUTO          数据库ID自增
     * IdType.INPUT         用户输入ID
     * IdType.ASSIGN_ID     全局唯一ID，内容为空自动填充（雪花算法）
     * IdType.ASSIGN_UUID   全局唯一ID，内容为空自动填充
     */
    @TableId(type = IdType.AUTO)
    private Integer commentId;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /** 用户名 */
    @Excel(name = "用户名")
    private String user;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String content;

    /** 评价等级 */
    @Excel(name = "评价等级")
    private Integer grader;

    /** 商家id */
    @Excel(name = "商家id")
    private Integer scenicId;

    public void setCommentId(Integer commentId)
    {
        this.commentId = commentId;
    }

    public Integer getCommentId()
    {
        return commentId;
    }
    public void setTime(Date time)
    {
        this.time = time;
    }

    public Date getTime()
    {
        return time;
    }
    public void setUser(String user)
    {
        this.user = user;
    }

    public String getUser()
    {
        return user;
    }
    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }
    public void setGrader(Integer grader)
    {
        this.grader = grader;
    }

    public Integer getGrader()
    {
        return grader;
    }
    public void setScenicId(Integer scenicId)
    {
        this.scenicId = scenicId;
    }

    public Integer getScenicId()
    {
        return scenicId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("commentId", getCommentId())
            .append("time", getTime())
            .append("user", getUser())
            .append("content", getContent())
            .append("grader", getGrader())
            .append("scenicId", getScenicId())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
